package com.welfare.business.mapper;

import java.util.List;
import com.welfare.business.domain.Book;
import com.welfare.business.domain.BookExample;
import org.apache.ibatis.annotations.Param;

/**
 * bookMapper接口
 * 
 * @author welfare
 * @date 2022-09-29
 */
public interface BookMapper 
{
    long countByExample(BookExample example);

    int deleteByExample(BookExample example);

    int deleteByPrimaryKey(Integer id);

    int insert(Book record);

    int insertSelective(Book record);

    List<Book> selectByExample(BookExample example);

    Book selectByPrimaryKey(Integer id);

    int updateByExampleSelective(@Param("record") Book record, @Param("example") BookExample example);

    int updateByExample(@Param("record") Book record, @Param("example") BookExample example);

    int updateByPrimaryKeySelective(Book record);

    int updateByPrimaryKey(Book record);


    /**
     * 查询book
     *
     * @param bid book主键
     * @return book
     */
    public Book selectBookByBid(Integer bid);

    /**
     * 查询book列表
     *
     * @param book book
     * @return book集合
     */
    public List<Book> selectBookList(Book book);

    /**
     * 新增book
     *
     * @param book book
     * @return 结果
     */
    public int insertBook(Book book);

    /**
     * 修改book
     *
     * @param book book
     * @return 结果
     */
    public int updateBook(Book book);

    /**
     * 删除book
     *
     * @param bid book主键
     * @return 结果
     */
    public int deleteBookByBid(Integer bid);

    /**
     * 批量删除book
     *
     * @param bids 需要删除的数据主键集合
     * @return 结果
     */
    public int deleteBookByBids(Integer[] bids);
}
